﻿// CAjust3Dlg.cpp: 实现文件
//

#include "pch.h"
#include "CAjust3Dlg.h"
#include "afxdialogex.h"
#include "resource.h"

// CAjust3Dlg 对话框

IMPLEMENT_DYNAMIC(CAjust3Dlg, CDialogEx)

CAjust3Dlg::CAjust3Dlg(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_DIALOG_AJUST_3, pParent)
{

}

CAjust3Dlg::~CAjust3Dlg()
{
}

void CAjust3Dlg::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CAjust3Dlg, CDialogEx)
	ON_WM_LBUTTONDOWN()
	ON_WM_LBUTTONUP()
	ON_WM_MOUSEMOVE()
END_MESSAGE_MAP()


// CAjust3Dlg 消息处理程序


BOOL CAjust3Dlg::OnInitDialog()
{
	CDialogEx::OnInitDialog();

	bBD = FALSE;

	// TODO:  在此添加额外的初始化

	this->MoveWindow(1920 - 300, 600, 300, 300);

	return TRUE;  // return TRUE unless you set the focus to a control
				  // 异常: OCX 属性页应返回 FALSE
}


void CAjust3Dlg::OnLButtonDown(UINT nFlags, CPoint point)
{
	// TODO: 在此添加消息处理程序代码和/或调用默认值

	bBD = TRUE;

	CDialogEx::OnLButtonDown(nFlags, point);
}


void CAjust3Dlg::OnLButtonUp(UINT nFlags, CPoint point)
{
	// TODO: 在此添加消息处理程序代码和/或调用默认值

	bBD = FALSE;

	CDialogEx::OnLButtonUp(nFlags, point);
}


void CAjust3Dlg::OnMouseMove(UINT nFlags, CPoint point)
{
	// TODO: 在此添加消息处理程序代码和/或调用默认值
	if (bBD)
	{
		m_pViewController->ScrollToMainAndZoom(point);
	}
	

	CDialogEx::OnMouseMove(nFlags, point);
}
